<?php
if(!defined('INEZCMS')){
	exit('Access Denied');
}
$MainNav="index";
if(isset($_POST['act'])){

if($_POST["valcode"]==""){
    jump(-1,'验证码错误！');
   exit;    
    
}
if($_POST["valcode"]!=$_SESSION["captcha"]){
   $_SESSION["captcha"]=""; 
   unset($_SESSION["captcha"]);
   $data["msg"]="验证码错误!"; 
    jump(-1,'验证码错误！');
   exit;   
}
 unset($_SESSION["captcha"]);
 $inquiryGroup=trim($_POST["inquiryGroup"]);
    $inquiryLastName=trim($_POST["inquiryLastName"]);
    $inquiryLastKana=trim($_POST["inquiryLastKana"]);    
    $commentcontent=trim($_POST["inquiryBody"]);
    $inquiryMail=trim($_POST["inquiryMail"]);


 if(empty($inquiryLastKana)){
    jump(-1,'请输入您的联系电话，以便我们跟你联系！');
 }
 if(empty($commentcontent)){
    jump(-1,'请输入问题内容！');
 }
 
    
    $data2=array("email"=>$inquiryMail,"contect"=>$inquiryLastName,"tel"=>$inquiryLastKana,"inquiryGroup"=>$inquiryGroup,"msg"=>$commentcontent,"ip"=>get_client_ip(),"addtime"=>time());
    $qid = $ezhand->insert('callback', $data2, 0); 
	jump(SITEURL."",'您的意见反馈我们已经收到，谢谢！');
}
?>